// import { useState } from "react";
// import request from "../axios/request";

// export const useRequest = async (id) => {
//   // eslint-disable-next-line react-hooks/rules-of-hooks
//   const [data, setdata] = useState("");
//   await request.get(`/article/${id}`).then((res) => {
//     //     setdata(res.data);
//     console.log(res.data);
//   });
//   return data;
// };
